package com.synergy.stockflow.procure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.synergy.stockflow.procure.entity.PurchaseOrder;
import com.synergy.stockflow.sales.entity.OrderReturns;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface PurchaseOrderMapper extends BaseMapper<PurchaseOrder> {
    List<PurchaseOrder> selectAll(Page<PurchaseOrder> page,
                                  @Param("purchaseOrderId") String purchaseOrderId,
                                  @Param("purchaseOrderName") String purchaseOrderName,
                                  @Param("purchaseOrderProductionPlanningId") String purchaseOrderProductionPlanningId,
                                  @Param("purchaseOrderDateOfSigning") Date purchaseOrderDateOfSigning,
                                  @Param("purchaseOrderDeliveryDate") Date purchaseOrderDeliveryDate,
                                  @Param("purchaseOrderEmployeeId") String purchaseOrderEmployeeId,
                                  @Param("purchaseOrderVendorId") String purchaseOrderVendorId,
                                  @Param("purchaseOrderInboundWarehouse") String purchaseOrderInboundWarehouse,
                                  @Param("purchaseOrderState") String purchaseOrderState);

    int deleteIs(String purchaseOrderId);

    PurchaseOrder selectDetails(String purchaseOrderId);

    int updateState(String purchaseOrderId);
}